import {
	request
} from '../../request'; // 获取首页数据

// http://bm.yundongshugen.com/api/auth  登录服务
// http://bm.yundongshugen.com/api/system  业务服务
// 用code获取accessToken
export function getAccessToken(data) {
	return request(`/auth/wx/getAccessToken?code=${data.code}`, data, 'post');
}
// 用accesstoken获取用户信息
export function getUserInfo(data) {
	return request(`/auth/wx/getUserInfo?accessToken=${data.accessToken}`, data, 'post');
}
// 获取最终token
export function getToken(data) {
	return request(`/auth/wx/getToken`, data, 'post');
}
export function teamDetail(data) {
	return request(`/system/bm/contest/teamDetail`, data, 'get');
}
export function contestList(data) {
	return request(`/system/bm/contest/list`, data, 'get');
}
export function createTeam(data) {
	return request(`/system/bm/contest/createTeam`, data, 'post');
}
export function editTeam(data) {
	return request(`/system/bm/contest/editTeam`, data, 'post');
}
export function contestDetail(data) {
	return request(`/system/bm/contest/detail`, data, 'get');
}
export function playerList(data) {
	return request(`/system/bm/contest/playerList`, data, 'get');
}
export function coachList(data) {
	return request(`/system/bm/contest/coachList`, data, 'get');
}
export function createCoach(data) {
	return request(`/system/bm/contest/createCoach`, data, 'post');
}
export function createPlayer(data) {
	return request(`/system/bm/contest/createPlayer`, data, 'post');
}
export function giftList(data) {
	return request(`/system/bm/contest/giftList`, data, 'get');
}
export function myTeam(data) {
	return request(`/system/bm/contest/myTeam`, data, 'get');
}
export function provinceList(data) {
	return request(`/system/bm/contest/provinceList`, data, 'get');
}
export function deleteCoach(data) {
	return request(`/system/bm/contest/deleteCoach?id=${data.id}`, data, 'post');
}
export function deletePlayer(data) {
	return request(`/system/bm/contest/deletePlayer?id=${data.id}`, data, 'post');
}
export function areaList(data) {
	return request(`/system/bm/contest/areaList`, data, 'get');
}
export function totalPlayerPay(data) {
	return request(`/system/bm/contest/totalPlayerPay`, data, 'post');
}